package com.swj.common.core.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.swj.common.core.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 系统访问记录表 sys_logininfor
 *
 * @author swj
 */
@Data
@TableName("sys_login_log")
public class SysLoginLog implements Serializable {

    /**
     * 主键id
     *  AUTO(0),
     *  NONE(1),
     *  INPUT(2),
     *  ASSIGN_ID(3),
     *  ASSIGN_UUID(4),
     *  ID_WORKER(3),
     *  ID_WORKER_STR(3),
     *  UUID(4);
     **/
    @TableId
    @Excel(name = "id")
    protected String id;

    /**
     * 创建者
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @Excel(name = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间")
    private LocalDateTime createTime;


    /**
     * 用户账号
     */
    @Excel(name = "用户账号")
    private String userName;

    /**
     * 状态 0成功 1失败
     */
    @Excel(name = "状态", readConverterExp = "0=成功,1=失败")
    private String status;

    /**
     * 地址
     */
    @Excel(name = "地址")
    private String ipaddr;

    /**
     * 描述
     */
    @Excel(name = "描述")
    private String msg;
}